#!/bin/bash

	>file2.txt

ip=(`cat /lianxi/xferlog|awk '{print $7}'|sort |uniq`)
cat /lianxi/xferlog |awk -F " " '{print $7,$8}'|sort  -n >file.txt
#echo ${ip[@]}
#cat file.txt
for i in ${ip[@]}
do 
 	ip_size=`cat file.txt|grep $i|cut -d " " -f2|tr "\n" "+"`
 	ip_total_size=$(($((${ip_size}0))/1000000))
	#echo $ip_total_size
	(( $ip_total_size > 2 ))&& echo "ip $i down_file is $ip_total_size MB"  >>file2.txt
	
done
 
	cat file2.txt|sort -t" " -nr -k5
